package config

type Configuration struct {
	Server   Server
	Database Database
	Log      Log
	Redis    Redis
	Minio    Minio
}

type Server struct {
	Port         string `json:"port" yaml:"port" mapstructure:"port"`
	Upload       string `json:"upload" yaml:"upload" mapstructure:"upload"`
	AccessExpire int64  `json:"accessExpire" yaml:"accessExpire" mapstructure:"accessExpire"`
	LOCAL        string `json:"local" yaml:"local" mapstructure:"local"`
}

type Database struct {
	UserName string `json:"username" yaml:"username" mapstructure:"username"`
	PassWord string `json:"password" yaml:"password" mapstructure:"password"`
	Address  string `json:"address" yaml:"address" mapstructure:"address"`
	Port     string `json:"port" yaml:"port" mapstructure:"port"`
	DBname   string `json:"dbname" yaml:"dbname" mapstructure:"dbname"`
}

type Log struct {
	Root_dir  string `json:"root_dir"`
	FileName  string `json:"file_name"`
	MaxSize   int    `json:"max_size"`
	MaxBackup int    `json:"max_backup"`
	MaxAge    int    `json:"max_age"`
	Level     string `json:"level"`
}

type Redis struct {
	Addr     string `json:"addr" yaml:"addr" mapstructure:"addr"`
	Port     string `json:"port" yaml:"port" mapstructure:"port"`
	Password string `json:"password" yaml:"password" mapstructure:"password"`
	DB       int    `json:"DB" yaml:"db" mapstructure:"db"`
}

type Minio struct {
	Zone       string `json:"zone" yaml:"zone" mapstructure:"zone"`
	AccessKey  string `json:"access_key" yaml:"access_key" mapstructure:"access_key"`
	SecretKey  string `json:"secret_key" yaml:"secret_key" mapstructure:"secret_key"`
	BucketName string `json:"bucket_name" yaml:"bucket_name" mapstructure:"bucket_name"`
	Alias      string `json:"alias" yaml:"alias" mapstructure:"alias"`
	DomainName string `json:"domain_name" yaml:"domain_name" mapstructure:"domain_name"`
}
